package com.ymatou.iapi.livemanage.service;

import java.util.HashMap;
import java.util.Map;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;

public class GetActivityInfoCall extends YmatouBaseCall{
private static String opurl ="api/activity/GetActivityInfo";
	
	public GetActivityInfoCall() {
		super(EnvSetup.getSystemUrl("livemanage"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public void setData(int liveId,int sellerId){
		super.setData("ActivityId="+liveId+"&UserId="+sellerId);
	}
	
	public void setData(Map<String, Object> paramMap){
		
		String paramStr = "";
		if (paramMap!=null){
			for(String strKey : paramMap.keySet()){
				paramStr = paramStr + "&"+strKey+"="+paramMap.get(strKey);
			}
			paramStr = paramStr.substring(1);
			System.out.print(paramStr);
		}
		
		
		super.setData(paramStr);
	}
	
	public static void main(String[] args) {
		Map<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("a", 1);
		paramMap.put("b", 2);
		new  GetActivityInfoCall().setData(paramMap);
	}
	
}
